3.5.36 \(\int (g+h x) (a+b \log (c (d (e+f x)^p)^q))^3 \, dx\) [436]

3.5.36.1 Optimal result
3.5.36.2 Mathematica [A] (verified)
3.5.36.3 Rubi [A] (verified)
3.5.36.4 Maple [B] (verified)
3.5.36.5 Fricas [B] (verification not implemented)
3.5.36.6 Sympy [B] (verification not implemented)
3.5.36.7 Maxima [B] (verification not implemented)
3.5.36.8 Giac [B] (verification not implemented)
3.5.36.9 Mupad [B] (verification not implemented)

3.5.36.1 Optimal result

Integrand size = 26, antiderivative size = 306 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\frac {6 a b^2 (f g-e h) p^2 q^2 x}{f}-\frac {6 b^3 (f g-e h) p^3 q^3 x}{f}-\frac {3 b^3 h p^3 q^3 (e+f x)^2}{8 f^2}+\frac {6 b^3 (f g-e h) p^2 q^2 (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^2}+\frac {3 b^2 h p^2 q^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 f^2}-\frac {3 b (f g-e h) p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^2}-\frac {3 b h p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 f^2}+\frac {(f g-e h) (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^2}+\frac {h (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{2 f^2} \]

output
6*a*b^2*(-e*h+f*g)*p^2*q^2*x/f-6*b^3*(-e*h+f*g)*p^3*q^3*x/f-3/8*b^3*h*p^3* 
q^3*(f*x+e)^2/f^2+6*b^3*(-e*h+f*g)*p^2*q^2*(f*x+e)*ln(c*(d*(f*x+e)^p)^q)/f 
^2+3/4*b^2*h*p^2*q^2*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))/f^2-3*b*(-e*h+f 
*g)*p*q*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/f^2-3/4*b*h*p*q*(f*x+e)^2*(a 
+b*ln(c*(d*(f*x+e)^p)^q))^2/f^2+(-e*h+f*g)*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p) 
^q))^3/f^2+1/2*h*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^3/f^2
 
3.5.36.2 Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.75 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\frac {8 (f g-e h) (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3+4 h (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3-24 b (f g-e h) p q \left ((e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2-2 b p q \left (f (a-b p q) x+b (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )-3 b h p q \left (2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+b p q \left (b f p q x (2 e+f x)-2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )\right )}{8 f^2} \]

input
Integrate[(g + h*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^3,x]
 
output
(8*(f*g - e*h)*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^3 + 4*h*(e + f*x 
)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3 - 24*b*(f*g - e*h)*p*q*((e + f*x)*( 
a + b*Log[c*(d*(e + f*x)^p)^q])^2 - 2*b*p*q*(f*(a - b*p*q)*x + b*(e + f*x) 
*Log[c*(d*(e + f*x)^p)^q])) - 3*b*h*p*q*(2*(e + f*x)^2*(a + b*Log[c*(d*(e 
+ f*x)^p)^q])^2 + b*p*q*(b*f*p*q*x*(2*e + f*x) - 2*(e + f*x)^2*(a + b*Log[ 
c*(d*(e + f*x)^p)^q]))))/(8*f^2)
 
3.5.36.3 Rubi [A] (verified)

Time = 0.82 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {2895, 2848, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3dx\)

\(\Big \downarrow \) 2848

\(\displaystyle \int \left (\frac {(f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f}+\frac {h (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {3 b^2 h p^2 q^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 f^2}+\frac {6 a b^2 p^2 q^2 x (f g-e h)}{f}-\frac {3 b p q (e+f x) (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^2}+\frac {(e+f x) (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^2}-\frac {3 b h p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 f^2}+\frac {h (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{2 f^2}+\frac {6 b^3 p^2 q^2 (e+f x) (f g-e h) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^2}-\frac {3 b^3 h p^3 q^3 (e+f x)^2}{8 f^2}-\frac {6 b^3 p^3 q^3 x (f g-e h)}{f}\)

input
Int[(g + h*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^3,x]
 
output
(6*a*b^2*(f*g - e*h)*p^2*q^2*x)/f - (6*b^3*(f*g - e*h)*p^3*q^3*x)/f - (3*b 
^3*h*p^3*q^3*(e + f*x)^2)/(8*f^2) + (6*b^3*(f*g - e*h)*p^2*q^2*(e + f*x)*L 
og[c*(d*(e + f*x)^p)^q])/f^2 + (3*b^2*h*p^2*q^2*(e + f*x)^2*(a + b*Log[c*( 
d*(e + f*x)^p)^q]))/(4*f^2) - (3*b*(f*g - e*h)*p*q*(e + f*x)*(a + b*Log[c* 
(d*(e + f*x)^p)^q])^2)/f^2 - (3*b*h*p*q*(e + f*x)^2*(a + b*Log[c*(d*(e + f 
*x)^p)^q])^2)/(4*f^2) + ((f*g - e*h)*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p 
)^q])^3)/f^2 + (h*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3)/(2*f^2)
 

3.5.36.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2848
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q*(a + b*Log[c*(d 
 + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*f - 
 d*g, 0] && IGtQ[q, 0]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.5.36.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1083\) vs. \(2(298)=596\).

Time = 5.22 (sec) , antiderivative size = 1084, normalized size of antiderivative = 3.54

method result size
parallelrisch \(\text {Expression too large to display}\) \(1084\)

input
int((h*x+g)*(a+b*ln(c*(d*(f*x+e)^p)^q))^3,x,method=_RETURNVERBOSE)
 
output
-1/8*(-12*x^2*ln(c*(d*(f*x+e)^p)^q)*a^2*b*f^2*h-24*x*ln(c*(d*(f*x+e)^p)^q) 
^2*a*b^2*f^2*g-24*x*ln(c*(d*(f*x+e)^p)^q)*a^2*b*f^2*g-24*ln(c*(d*(f*x+e)^p 
)^q)^2*a*b^2*e*f*g+24*ln(c*(d*(f*x+e)^p)^q)*a^2*b*e*f*g+78*ln(f*x+e)*b^3*e 
^2*h*p^3*q^3-36*ln(c*(d*(f*x+e)^p)^q)*b^3*e^2*h*p^2*q^2-12*x^2*ln(c*(d*(f* 
x+e)^p)^q)^2*a*b^2*f^2*h+36*x*ln(c*(d*(f*x+e)^p)^q)*b^3*e*f*h*p^2*q^2+24*l 
n(c*(d*(f*x+e)^p)^q)*a*b^2*e^2*h*p*q-96*ln(f*x+e)*b^3*e*f*g*p^3*q^3-60*ln( 
f*x+e)*a*b^2*e^2*h*p^2*q^2+12*ln(f*x+e)*a^2*b*e^2*h*p*q-24*a^2*b*e*f*g*p*q 
+48*x*ln(c*(d*(f*x+e)^p)^q)*a*b^2*f^2*g*p*q-12*x*a^2*b*e*f*h*p*q-48*ln(c*( 
d*(f*x+e)^p)^q)*a*b^2*e*f*g*p*q+96*ln(f*x+e)*a*b^2*e*f*g*p^2*q^2-48*ln(f*x 
+e)*a^2*b*e*f*g*p*q-24*x*ln(c*(d*(f*x+e)^p)^q)*a*b^2*e*f*h*p*q+12*x^2*ln(c 
*(d*(f*x+e)^p)^q)*a*b^2*f^2*h*p*q-12*x*ln(c*(d*(f*x+e)^p)^q)^2*b^3*e*f*h*p 
*q+36*x*a*b^2*e*f*h*p^2*q^2+48*a*b^2*e*f*g*p^2*q^2+42*b^3*e^2*h*p^3*q^3+8* 
a^3*e*f*g-6*x^2*ln(c*(d*(f*x+e)^p)^q)*b^3*f^2*h*p^2*q^2-42*x*b^3*e*f*h*p^3 
*q^3+6*x^2*ln(c*(d*(f*x+e)^p)^q)^2*b^3*f^2*h*p*q-6*x^2*a*b^2*f^2*h*p^2*q^2 
-48*x*ln(c*(d*(f*x+e)^p)^q)*b^3*f^2*g*p^2*q^2+24*x*ln(c*(d*(f*x+e)^p)^q)^2 
*b^3*f^2*g*p*q-48*x*a*b^2*f^2*g*p^2*q^2+48*ln(c*(d*(f*x+e)^p)^q)*b^3*e*f*g 
*p^2*q^2+6*x^2*a^2*b*f^2*h*p*q+24*ln(c*(d*(f*x+e)^p)^q)^2*b^3*e*f*g*p*q+24 
*x*a^2*b*f^2*g*p*q+4*ln(c*(d*(f*x+e)^p)^q)^3*b^3*e^2*h-4*x^2*a^3*f^2*h-8*x 
*a^3*f^2*g+3*x^2*b^3*f^2*h*p^3*q^3+48*x*b^3*f^2*g*p^3*q^3-18*ln(c*(d*(f*x+ 
e)^p)^q)^2*b^3*e^2*h*p*q-36*a*b^2*e^2*h*p^2*q^2+12*a^2*b*e^2*h*p*q-48*b...
 
3.5.36.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1692 vs. \(2 (298) = 596\).

Time = 0.39 (sec) , antiderivative size = 1692, normalized size of antiderivative = 5.53 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="fricas")
 
output
1/8*(4*(b^3*f^2*h*p^3*q^3*x^2 +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- a^2*b*e*f*h)*p*q)*x 
+ 6*((8*b^3*e*f*g - 7*b^3*e^2*h)*p^3*q^3 - 2*(4*a*b^2*e*f*g - 3*a*b^2*e^2* 
h)*p^2*q^2 + 2*(2*a^2*b*e*f*g - a^2*b*e^2*h)*p*q + (b^3*f^2*h*p^3*q^3 - 2* 
a*b^2*f^2*h*p^2*q^2 + 2*a^2*b*f^2*h*p*q)*x^2 + 2*(b^3*f^2*h*p*q*x^2 + 2*b^ 
3*f^2*g*p*q*x + (2*b^3*e*f*g - b^3*e^2*h)*p*q)*log(c)^2 + 2*(b^3*f^2*h*p*q 
^3*x^2 + 2*b^3*f^2*g*p*q^3*x + (2*b^3*e*f*g - b^3*e^2*h)*p*q^3)*log(d)^...
 
3.5.36.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 991 vs. \(2 (299) = 598\).

Time = 2.58 (sec) , antiderivative size = 991, normalized size of antiderivative = 3.24 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)*(a+b*ln(c*(d*(f*x+e)**p)**q))**3,x)
 
output
Piecewise((a**3*g*x + a**3*h*x**2/2 - 3*a**2*b*e**2*h*log(c*(d*(e + f*x)** 
p)**q)/(2*f**2) + 3*a**2*b*e*g*log(c*(d*(e + f*x)**p)**q)/f + 3*a**2*b*e*h 
*p*q*x/(2*f) - 3*a**2*b*g*p*q*x + 3*a**2*b*g*x*log(c*(d*(e + f*x)**p)**q) 
- 3*a**2*b*h*p*q*x**2/4 + 3*a**2*b*h*x**2*log(c*(d*(e + f*x)**p)**q)/2 + 9 
*a*b**2*e**2*h*p*q*log(c*(d*(e + f*x)**p)**q)/(2*f**2) - 3*a*b**2*e**2*h*l 
og(c*(d*(e + f*x)**p)**q)**2/(2*f**2) - 6*a*b**2*e*g*p*q*log(c*(d*(e + f*x 
)**p)**q)/f + 3*a*b**2*e*g*log(c*(d*(e + f*x)**p)**q)**2/f - 9*a*b**2*e*h* 
p**2*q**2*x/(2*f) + 3*a*b**2*e*h*p*q*x*log(c*(d*(e + f*x)**p)**q)/f + 6*a* 
b**2*g*p**2*q**2*x - 6*a*b**2*g*p*q*x*log(c*(d*(e + f*x)**p)**q) + 3*a*b** 
2*g*x*log(c*(d*(e + f*x)**p)**q)**2 + 3*a*b**2*h*p**2*q**2*x**2/4 - 3*a*b* 
*2*h*p*q*x**2*log(c*(d*(e + f*x)**p)**q)/2 + 3*a*b**2*h*x**2*log(c*(d*(e + 
 f*x)**p)**q)**2/2 - 21*b**3*e**2*h*p**2*q**2*log(c*(d*(e + f*x)**p)**q)/( 
4*f**2) + 9*b**3*e**2*h*p*q*log(c*(d*(e + f*x)**p)**q)**2/(4*f**2) - b**3* 
e**2*h*log(c*(d*(e + f*x)**p)**q)**3/(2*f**2) + 6*b**3*e*g*p**2*q**2*log(c 
*(d*(e + f*x)**p)**q)/f - 3*b**3*e*g*p*q*log(c*(d*(e + f*x)**p)**q)**2/f + 
 b**3*e*g*log(c*(d*(e + f*x)**p)**q)**3/f + 21*b**3*e*h*p**3*q**3*x/(4*f) 
- 9*b**3*e*h*p**2*q**2*x*log(c*(d*(e + f*x)**p)**q)/(2*f) + 3*b**3*e*h*p*q 
*x*log(c*(d*(e + f*x)**p)**q)**2/(2*f) - 6*b**3*g*p**3*q**3*x + 6*b**3*g*p 
**2*q**2*x*log(c*(d*(e + f*x)**p)**q) - 3*b**3*g*p*q*x*log(c*(d*(e + f*x)* 
*p)**q)**2 + b**3*g*x*log(c*(d*(e + f*x)**p)**q)**3 - 3*b**3*h*p**3*q**...
 
3.5.36.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 732 vs. \(2 (298) = 596\).

Time = 0.23 (sec) , antiderivative size = 732, normalized size of antiderivative = 2.39 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\frac {1}{2} \, b^{3} h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{3} - 3 \, a^{2} b f g p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} - \frac {3}{4} \, a^{2} b f h p q {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}} + \frac {f x^{2} - 2 \, e x}{f^{2}}\right )} + \frac {3}{2} \, a b^{2} h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + b^{3} g x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{3} + \frac {3}{2} \, a^{2} b h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + 3 \, a b^{2} g x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + \frac {1}{2} \, a^{3} h x^{2} + 3 \, a^{2} b g x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) - 3 \, {\left (2 \, f p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {{\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} p^{2} q^{2}}{f}\right )} a b^{2} g - {\left (3 \, f p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} - {\left (\frac {{\left (e \log \left (f x + e\right )^{3} + 3 \, e \log \left (f x + e\right )^{2} - 6 \, f x + 6 \, e \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{2}} - \frac {3 \, {\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} p q \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{f^{2}}\right )} f p q\right )} b^{3} g - \frac {3}{4} \, {\left (2 \, f p q {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}} + \frac {f x^{2} - 2 \, e x}{f^{2}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) - \frac {{\left (f^{2} x^{2} + 2 \, e^{2} \log \left (f x + e\right )^{2} - 6 \, e f x + 6 \, e^{2} \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{2}}\right )} a b^{2} h - \frac {1}{8} \, {\left (6 \, f p q {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}} + \frac {f x^{2} - 2 \, e x}{f^{2}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + {\left (\frac {{\left (4 \, e^{2} \log \left (f x + e\right )^{3} + 3 \, f^{2} x^{2} + 18 \, e^{2} \log \left (f x + e\right )^{2} - 42 \, e f x + 42 \, e^{2} \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{3}} - \frac {6 \, {\left (f^{2} x^{2} + 2 \, e^{2} \log \left (f x + e\right )^{2} - 6 \, e f x + 6 \, e^{2} \log \left (f x + e\right )\right )} p q \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{f^{3}}\right )} f p q\right )} b^{3} h + a^{3} g x \]

input
integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="maxima")
 
output
1/2*b^3*h*x^2*log(((f*x + e)^p*d)^q*c)^3 - 3*a^2*b*f*g*p*q*(x/f - e*log(f* 
x + e)/f^2) - 3/4*a^2*b*f*h*p*q*(2*e^2*log(f*x + e)/f^3 + (f*x^2 - 2*e*x)/ 
f^2) + 3/2*a*b^2*h*x^2*log(((f*x + e)^p*d)^q*c)^2 + b^3*g*x*log(((f*x + e) 
^p*d)^q*c)^3 + 3/2*a^2*b*h*x^2*log(((f*x + e)^p*d)^q*c) + 3*a*b^2*g*x*log( 
((f*x + e)^p*d)^q*c)^2 + 1/2*a^3*h*x^2 + 3*a^2*b*g*x*log(((f*x + e)^p*d)^q 
*c) - 3*(2*f*p*q*(x/f - e*log(f*x + e)/f^2)*log(((f*x + e)^p*d)^q*c) + (e* 
log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p^2*q^2/f)*a*b^2*g - (3*f*p*q*( 
x/f - e*log(f*x + e)/f^2)*log(((f*x + e)^p*d)^q*c)^2 - ((e*log(f*x + e)^3 
+ 3*e*log(f*x + e)^2 - 6*f*x + 6*e*log(f*x + e))*p^2*q^2/f^2 - 3*(e*log(f* 
x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p*q*log(((f*x + e)^p*d)^q*c)/f^2)*f*p 
*q)*b^3*g - 3/4*(2*f*p*q*(2*e^2*log(f*x + e)/f^3 + (f*x^2 - 2*e*x)/f^2)*lo 
g(((f*x + e)^p*d)^q*c) - (f^2*x^2 + 2*e^2*log(f*x + e)^2 - 6*e*f*x + 6*e^2 
*log(f*x + e))*p^2*q^2/f^2)*a*b^2*h - 1/8*(6*f*p*q*(2*e^2*log(f*x + e)/f^3 
 + (f*x^2 - 2*e*x)/f^2)*log(((f*x + e)^p*d)^q*c)^2 + ((4*e^2*log(f*x + e)^ 
3 + 3*f^2*x^2 + 18*e^2*log(f*x + e)^2 - 42*e*f*x + 42*e^2*log(f*x + e))*p^ 
2*q^2/f^3 - 6*(f^2*x^2 + 2*e^2*log(f*x + e)^2 - 6*e*f*x + 6*e^2*log(f*x + 
e))*p*q*log(((f*x + e)^p*d)^q*c)/f^3)*f*p*q)*b^3*h + a^3*g*x
 
3.5.36.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2532 vs. \(2 (298) = 596\).

Time = 0.38 (sec) , antiderivative size = 2532, normalized size of antiderivative = 8.27 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="giac")
 
output
(f*x + e)*b^3*g*p^3*q^3*log(f*x + e)^3/f + 1/2*(f*x + e)^2*b^3*h*p^3*q^3*l 
og(f*x + e)^3/f^2 - (f*x + e)*b^3*e*h*p^3*q^3*log(f*x + e)^3/f^2 - 3*(f*x 
+ e)*b^3*g*p^3*q^3*log(f*x + e)^2/f - 3/4*(f*x + e)^2*b^3*h*p^3*q^3*log(f* 
x + e)^2/f^2 + 3*(f*x + e)*b^3*e*h*p^3*q^3*log(f*x + e)^2/f^2 + 3*(f*x + e 
)*b^3*g*p^2*q^3*log(f*x + e)^2*log(d)/f + 3/2*(f*x + e)^2*b^3*h*p^2*q^3*lo 
g(f*x + e)^2*log(d)/f^2 - 3*(f*x + e)*b^3*e*h*p^2*q^3*log(f*x + e)^2*log(d 
)/f^2 + 6*(f*x + e)*b^3*g*p^3*q^3*log(f*x + e)/f + 3/4*(f*x + e)^2*b^3*h*p 
^3*q^3*log(f*x + e)/f^2 - 6*(f*x + e)*b^3*e*h*p^3*q^3*log(f*x + e)/f^2 + 3 
*(f*x + e)*b^3*g*p^2*q^2*log(f*x + e)^2*log(c)/f + 3/2*(f*x + e)^2*b^3*h*p 
^2*q^2*log(f*x + e)^2*log(c)/f^2 - 3*(f*x + e)*b^3*e*h*p^2*q^2*log(f*x + e 
)^2*log(c)/f^2 - 6*(f*x + e)*b^3*g*p^2*q^3*log(f*x + e)*log(d)/f - 3/2*(f* 
x + e)^2*b^3*h*p^2*q^3*log(f*x + e)*log(d)/f^2 + 6*(f*x + e)*b^3*e*h*p^2*q 
^3*log(f*x + e)*log(d)/f^2 + 3*(f*x + e)*b^3*g*p*q^3*log(f*x + e)*log(d)^2 
/f + 3/2*(f*x + e)^2*b^3*h*p*q^3*log(f*x + e)*log(d)^2/f^2 - 3*(f*x + e)*b 
^3*e*h*p*q^3*log(f*x + e)*log(d)^2/f^2 - 6*(f*x + e)*b^3*g*p^3*q^3/f - 3/8 
*(f*x + e)^2*b^3*h*p^3*q^3/f^2 + 6*(f*x + e)*b^3*e*h*p^3*q^3/f^2 + 3*(f*x 
+ e)*a*b^2*g*p^2*q^2*log(f*x + e)^2/f + 3/2*(f*x + e)^2*a*b^2*h*p^2*q^2*lo 
g(f*x + e)^2/f^2 - 3*(f*x + e)*a*b^2*e*h*p^2*q^2*log(f*x + e)^2/f^2 - 6*(f 
*x + e)*b^3*g*p^2*q^2*log(f*x + e)*log(c)/f - 3/2*(f*x + e)^2*b^3*h*p^2*q^ 
2*log(f*x + e)*log(c)/f^2 + 6*(f*x + e)*b^3*e*h*p^2*q^2*log(f*x + e)*lo...
 
3.5.36.9 Mupad [B] (verification not implemented)

Time = 1.91 (sec) , antiderivative size = 651, normalized size of antiderivative = 2.13 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=x\,\left (\frac {4\,a^3\,e\,h+4\,a^3\,f\,g+18\,b^3\,e\,h\,p^3\,q^3-24\,b^3\,f\,g\,p^3\,q^3-12\,a^2\,b\,f\,g\,p\,q-12\,a\,b^2\,e\,h\,p^2\,q^2+24\,a\,b^2\,f\,g\,p^2\,q^2}{4\,f}-\frac {e\,h\,\left (4\,a^3-6\,a^2\,b\,p\,q+6\,a\,b^2\,p^2\,q^2-3\,b^3\,p^3\,q^3\right )}{4\,f}\right )+{\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}^2\,\left (\frac {x\,\left (\frac {6\,b^2\,\left (a\,e\,h+a\,f\,g-b\,f\,g\,p\,q\right )}{f}-\frac {3\,b^2\,e\,h\,\left (2\,a-b\,p\,q\right )}{f}\right )}{2}-\frac {3\,e\,\left (2\,a\,b^2\,e\,h-4\,a\,b^2\,f\,g-3\,b^3\,e\,h\,p\,q+4\,b^3\,f\,g\,p\,q\right )}{4\,f^2}+\frac {3\,b^2\,h\,x^2\,\left (2\,a-b\,p\,q\right )}{4}\right )+{\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}^3\,\left (\frac {b^3\,h\,x^2}{2}-\frac {e\,\left (b^3\,e\,h-2\,b^3\,f\,g\right )}{2\,f^2}+b^3\,g\,x\right )+\frac {\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\,\left (x^2\,\left (6\,a^2\,b\,f\,g+\frac {3\,b\,e\,h\,\left (2\,a^2-2\,a\,b\,p\,q+b^2\,p^2\,q^2\right )}{2}-9\,b^3\,e\,h\,p^2\,q^2+12\,b^3\,f\,g\,p^2\,q^2+6\,a\,b^2\,e\,h\,p\,q-12\,a\,b^2\,f\,g\,p\,q\right )+\frac {3\,e\,x\,\left (2\,a^2\,b\,f\,g-3\,b^3\,e\,h\,p^2\,q^2+4\,b^3\,f\,g\,p^2\,q^2+2\,a\,b^2\,e\,h\,p\,q-4\,a\,b^2\,f\,g\,p\,q\right )}{f}+\frac {3\,b\,f\,h\,x^3\,\left (2\,a^2-2\,a\,b\,p\,q+b^2\,p^2\,q^2\right )}{2}\right )}{2\,e+2\,f\,x}+\frac {h\,x^2\,\left (4\,a^3-6\,a^2\,b\,p\,q+6\,a\,b^2\,p^2\,q^2-3\,b^3\,p^3\,q^3\right )}{8}-\frac {\ln \left (e+f\,x\right )\,\left (6\,h\,a^2\,b\,e^2\,p\,q-12\,f\,g\,a^2\,b\,e\,p\,q-18\,h\,a\,b^2\,e^2\,p^2\,q^2+24\,f\,g\,a\,b^2\,e\,p^2\,q^2+21\,h\,b^3\,e^2\,p^3\,q^3-24\,f\,g\,b^3\,e\,p^3\,q^3\right )}{4\,f^2} \]

input
int((g + h*x)*(a + b*log(c*(d*(e + f*x)^p)^q))^3,x)
 
output
x*((4*a^3*e*h + 4*a^3*f*g + 18*b^3*e*h*p^3*q^3 - 24*b^3*f*g*p^3*q^3 - 12*a 
^2*b*f*g*p*q - 12*a*b^2*e*h*p^2*q^2 + 24*a*b^2*f*g*p^2*q^2)/(4*f) - (e*h*( 
4*a^3 - 3*b^3*p^3*q^3 + 6*a*b^2*p^2*q^2 - 6*a^2*b*p*q))/(4*f)) + log(c*(d* 
(e + f*x)^p)^q)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